﻿@model IEnumerable<CofeWebApplication.ServiceReference1.BasketDTO>

@{
    ViewBag.Title = "Index";
}

<h2>My Mug</h2>
<div class="container">
    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.SumPrice)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Paid)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.User.Name)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.SumPrice)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Paid)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.User.Name)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                    @Html.ActionLink("Details", "Details", new { id = item.Id }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.Id })
                </td>
            </tr>
        }

    </table>
</div>